<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>专业数据处理平台</title>
    <meta name="description" content="这是一个 nodeDetail 页面">
    <meta name="keywords" content="nodeDetail">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="${ctx}/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="${ctx}/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="stylesheet" href="${ctx}/assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="${ctx}/assets/css/admin.css">
    <link rel="stylesheet" href="${ctx}/assets/css/app.css">
    <link rel="stylesheet" type="text/css" href="${ctx}/assets/css/xcConfirm.css"/>
    <style>
        .my-form-height{
            height: 60px;
            overflow:hidden;
        }
        .my-form-label{
            color: #999;
            height: 60px;
            line-height: 60px;
            text-align: right;
            width: 140px;
            position: absolute;
            top: 0;
            left: 0;
        }
        .my-form-content{
            padding-left: 145px;
            padding-right: 0;
            width: 100%;
            height: 60px;
            line-height: 60px;
            display: inline-block;
            float: none!important;
        }
        .my-state-css{
            width: 80px;
            height: 28px;
            text-align: center;
            line-height: 28px;
            display: inline-block;
            padding: 0;
            margin: 0;
        }
    </style>
</head>

<body data-type="chart">
        <!--标题-->
        <div class="tpl-content-page-title">
            工作流系统--节点
        </div>
        <!--面包屑-->
        <ol class="am-breadcrumb">
            <li><a href="#" class="am-icon-home">首页</a></li>
            <li><a href="#">调度</a></li>
            <li class="am-active">节点详情</li>
        </ol>
        <div class="tpl-portlet-components">
            <div class="tpl-portlet-components">

                <div class="portlet-title">
                    <div class="caption font-green bold">
                        节点详情
                    </div>
                </div>
                <div class="tpl-portlet-components"  style="min-width: 0; min-height: 0">
                    <div class="portlet-title">
                        <div class="caption font-green">
                            节点基本信息
                        </div>
                    </div>
                    <div class="am-g tpl-amazeui-form">
                        <div class="am-u-sm-12">
                            <form class="am-form am-form-horizontal">
                                <div class="am-form-group my-form-height">
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">节点主机名:</div>
                                        <div class="my-form-content" id="name"></div>
                                    </div>
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">IP:</div>
                                        <div class="my-form-content" id="ip"></div>
                                    </div>
                                </div>

                                <div class="am-form-group my-form-height">
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">GPU资源标识:</div>
                                        <div class="my-form-content" id="gpu_identification"></div>
                                    </div>
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">GPU型号:</div>
                                        <div class="my-form-content" id="gpu_model"></div>
                                    </div>
                                </div>

                                <div class="am-form-group my-form-height">
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">GPU描述:</div>
                                        <div class="my-form-content" id="gpu_description"></div>
                                    </div>
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">节点分组:</div>
                                        <div class="my-form-content" id="node_group"></div>
                                    </div>
                                </div>

                                <div class="am-form-group my-form-height">
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">CPU使用率:</div>
                                        <div class="my-form-content" id="cpunum"></div>
                                    </div>
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">剩余内存:</div>
                                        <div class="my-form-content" id="memorynum"></div>
                                    </div>
                                </div>

                                <div class="am-form-group my-form-height">
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">15秒CPU运行队列长度:</div>
                                        <div class="my-form-content" id="r15s"></div>
                                    </div>
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">1分钟CPU运行队列长度:</div>
                                        <div class="my-form-content" id="r1m"></div>
                                    </div>
                                </div>

                                <div class="am-form-group my-form-height">
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">15分钟CPU运行队列长度:</div>
                                        <div class="my-form-content" id="r15m"></div>
                                    </div>
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">分页率:</div>
                                        <div class="my-form-content" id="pg"></div>
                                    </div>
                                </div>

                                <div class="am-form-group my-form-height">
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">登录会话的数量:</div>
                                        <div class="my-form-content" id="ls"></div>
                                    </div>
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">空闲时间（分钟）:</div>
                                        <div class="my-form-content" id="it"></div>
                                    </div>
                                </div>

                                <div class="am-form-group my-form-height">
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">tmp中的磁盘空间:</div>
                                        <div class="my-form-content" id="tmp"></div>
                                    </div>
                                    <div class="am-u-sm-6 my-form-height">
                                        <div class="my-form-label">可用的交换空间:</div>
                                        <div class="my-form-content" id="swp"></div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <!--<div class="tpl-portlet-components"  style="min-width: 0; min-height: 0">-->
                    <!--<div class="portlet-title">-->
                        <!--<div class="caption font-green">-->
                            <!--集群后台服务信息-->
                        <!--</div>-->
                    <!--</div>-->
                    <!--<div class="am-g tpl-amazeui-form">-->
                        <!--<div class="am-u-sm-12">-->
                            <!--<table class="am-table am-table-striped am-table-hover table-main" id="logTableList">-->
                                <!--<thead>-->
                                    <!--<tr>-->
                                        <!--<th style="min-width: 50px;">序号</th>-->
                                        <!--<th style="min-width: 100px;">服务名</th>-->
                                        <!--<th style="min-width: 100px;">描述</th>-->
                                        <!--<th style="min-width: 100px;">状态</th>-->
                                        <!--<th style="width: 180px;">操作</th>-->
                                    <!--</tr>-->
                                <!--</thead>-->
                                <!--<tbody>-->
                                    <!--<tr>-->
                                        <!--<td>1</td>-->
                                        <!--<td>服务1</td>-->
                                        <!--<td>服务1描述</td>-->
                                        <!--<td>-->
                                            <!--<div class="am-alert am-alert-success my-state-css">运行中</div>-->
                                        <!--</td>-->
                                        <!--<td>-->
                                            <!--<div class="am-btn-group am-btn-group-xs">-->
                                                <!--<div type="button" class="am-btn am-btn-default am-radius" disabled="disabled">启动</div>-->
                                                <!--<div type="button" class="am-btn am-btn-default am-radius">停止</div>-->
                                                <!--<div type="button" class="am-btn am-btn-default am-radius">重启</div>-->
                                            <!--</div>-->
                                        <!--</td>-->
                                    <!--</tr>-->
                                    <!--<tr>-->
                                        <!--<td>2</td>-->
                                        <!--<td>服务2</td>-->
                                        <!--<td>服务2描述</td>-->
                                        <!--<td>-->
                                            <!--<div class="am-alert am-alert-danger my-state-css">停止</div>-->
                                        <!--</td>-->
                                        <!--<td>-->
                                            <!--<div class="am-btn-group am-btn-group-xs">-->
                                                <!--<div type="button" class="am-btn am-btn-default am-radius">启动</div>-->
                                                <!--<div type="button" class="am-btn am-btn-default am-radius" disabled="disabled">停止</div>-->
                                                <!--<div type="button" class="am-btn am-btn-default am-radius">重启</div>-->
                                            <!--</div>-->
                                        <!--</td>-->
                                    <!--</tr>-->
                                <!--</tbody>-->
                            <!--</table>-->
                            <!--<div class="am-cf am-center">-->
                                <!--<div id="prePage1" style="text-align: center;" am-pagination="pagination_1" pagenumber="1" totalpage="6"></div>-->
                            <!--</div>-->
                            <!--<hr>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
            </div>
        </div>
<script src="${ctx}/assets/js/jQuery/jquery.min.js"></script>
<script src="${ctx}/assets/js/jQuery/jquery-1.9.1.js"></script>
<%-- <script src="${ctx}/assets/js/utils.js"></script> --%>
<script src="${ctx}/assets/js/common/config.js"></script>
<script src="${ctx}/assets/js/common/amazeui.min.js"></script>
<script src="${ctx}/assets/js/common/app.js"></script>
<script src="${ctx}/assets/js/common/xcConfirm.js"></script>
<script src="${ctx}/assets/js/layer/layer.js"></script>
<script>
    var nodeId = '<%=request.getAttribute("nodeId")%>';
    $.ajax({
        url:constUrl+"HostServlet",
        type:'post',
        dataType:'json',
        data:{
            operateType: "getHost",
            hostName: nodeId
        },
        success: function(responseText) {
            if (responseText.result=="success"){
                $("#name").html(responseText.message.nodeName);
                $("#ip").html(responseText.message.nodeIp);
//                 $("#gpu_identification").html(responseText.message.gpu.gpuIdentify);
                $("#gpu_model").html(responseText.message.gpu.gpuVersion);
                $("#gpu_description").html(responseText.message.gpu.gpuDetail);
                $("#node_group").html(responseText.message.groupName);
                $("#cpunum").html(responseText.message.ut);
                $("#memorynum").html(responseText.message.mem);
                $("#r15s").html(responseText.message.r15s);
                $("#r1m").html(responseText.message.r1m);
                $("#r15m").html(responseText.message.r15m);
                $("#pg").html(responseText.message.pg);
                $("#ls").html(responseText.message.ls);
                $("#it").html(responseText.message.it);
                $("#tmp").html(responseText.message.tmp);
                $("#swp").html(responseText.message.swp);
            }
        },
        complete: function() {
        },
        error: function() {
        }
    });
</script>
</body>

</html>